<?php
/**
 * ===============================================
 * 版权所有 2019-2050 青岛铁锤科技有限公司，并保留所有权利。
 * 网站地址: http://www.huaxianling.com
 * ===============================================
 * Author: Happy dong
 * Created Time: 2019-06-27 14:14
 * Modified Time: 2019-06-27 14:14
 * Version: 2.0
 */

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Appointment extends Model
{
    protected $table = "appointment";

    protected $guarded = [

    ];

    protected $dates = [
        'created_at',
        'updated_at',
    ];

    /*
     * 和服务关联一对一
     */
    public function service()
    {
        return $this->hasOne(StoreService::class, 'id', 'service_id');
    }

    public function user()
    {
        return $this->hasOne(User::class, 'id', 'barber_id');
    }

}
